#pragma once

#define SCREEN_WIDTH	1024
#define SCREEN_HEIGHT	768
#define SCREEN_BPP		16

#define WINDOW_CLASS L"DIRECTXWIN"
#define KEYDOWN(vk_code) ((GetAsyncKeyState(vk_code) & 0x8000) ? 1 : 0)
#define KEYUP(vk_code) ((GetAsyncKeyState(vk_code) & 0x8000) ? 0 : 1)
#define MAX(a,b) (a < b ? b : a)
#define MIN(a,b) (a > b ? b : a)

#define INIT_DDRAW(object) {memset(&object, 0, sizeof(object));object.dwSize = sizeof(object);}
#define _RGB16BIT565(r,g,b) ((b>>2) | ((g>>3) << 5) + ((r%32) << 11))
#define _RGB16BIT555(r,g,b) ((b>>2) | ((g>>2) << 5) + ((r>>2) << 10))
#define _RGB32BIT(a,r,g,b) (b + (g << 8) + (r << 16) + (a << 24))

#define WM_MOUSEWHEEL 0x20A
#define WHEEL_DELTA 120